package reflect.proxyTest;

import org.apache.ibatis.binding.MapperProxyFactory;

import java.lang.reflect.Proxy;

public class ProxyTest {
    public static void main(String[] args) {
        UserInactionHandler userInactionHandler = new UserInactionHandler();
        UserServiceImpl userServiceImpl = new UserServiceImpl();
        UserService userService = (UserService) userInactionHandler.getProxyInstance(userServiceImpl);
        System.out.println(userService);
        userService.addUser(1L);

        System.out.println(" ----------- ");
        PlayerServiceSession playerServiceSession = new PlayerServiceSession();
        PlayerService playerService = playerServiceSession.getPlayerServiceM(PlayerService.class);
        playerService.addPlayer(111);
    }
}
